package com.eda.common;

import java.util.ArrayList;
import java.util.List;

public class ValueConvert {
	public static List<List<String>> convert(String value){
		List<List<String>> result = new ArrayList<List<String>>();
		if(value!=null && value.length()>0){
			
			String[] lines = value.split("\n");
			for(int i=0;i<lines.length-2;i++){
				if(lines[i].length()>0){
					String[] items = lines[i].split("\r");
					List<String> lineList = new ArrayList<String>();
					for(int j=0;j<items.length;j++){
						if(items[j].length()>0){
							lineList.add(j,(items[j]).replaceAll("~", ""));
						}
					}
					result.add(i,lineList);
				}
			}
			List<String> totalList = new ArrayList<String>();
			totalList.add(lines[lines.length-1]);
			result.add(totalList);
		}
		return result;
	}
	
	public static String URL = "http://192.168.0.8:8080/apiserver/";
	
	
	public static String MY_CARGO = "myCargos.do";
	public static String MY_TRUCK = "myTruck.do";
	public static String FIND_CARGO = "findCargo.do";
	public static String FIND_TRUCK = "findTruck.do";
	
	
}
